home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1997 September & October / Amiga-CD 1997 #9-10.iso / software / fm2_demo / rexx / tut_fontgroviera.rexx < prev    next >
OS/2 REXX Batch file  |  1996-10-30  |  3KB  |  102 lines

  1. /******************************************************************/
  2. /* ClassX Amiga Rexx script - Copyright © 1996 ClassX Development */
  3. /******************************************************************/
  4.  
  5. /*
  6.     $VER: TUT_FontGroviera.rexx 1.0
  7.     $INF: Esempio guidato per la creazione di un font in stile Groviera.
  8. */
  9.  
  10. MYPORT = 'FontMachine'
  11.  
  12. IF ~SHOW('P', MYPORT) THEN DO
  13.     IF EXISTS('FontMachine:FontMachine') THEN DO
  14.         ADDRESS COMMAND 'Run >NIL: FontMachine:FontMachine'
  15.         DO 30 WHILE ~SHOW('P',MYPORT)
  16.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  17.         END
  18.     END
  19.     ELSE DO
  20.         SAY "FontMachine could not be loaded."
  21.         EXIT 10
  22.     END
  23. END
  24.  
  25. IF ~SHOW('P', MYPORT) THEN DO
  26.     SAY 'FontMachine Rexx port could not be opened.'
  27.     EXIT 10
  28. END
  29.  
  30. ADDRESS VALUE MYPORT
  31. OPTIONS RESULTS
  32. OPTIONS FAILAT 10000
  33.  
  34. /******************************************************************/
  35.  
  36. /* Make sure rexxsupport library is opened */
  37. IF ~SHOW('L','rexxsupport.library') THEN CALL ADDLIB('rexxsupport.library',0,-30)
  38.  
  39. LockGui
  40.  
  41. SetAttr "Emboss" 0
  42. SetAttr "Bevel" 0
  43. SetAttr "3D" 0
  44. SetAttr "Shadow" 0
  45. SetAttr "Outline" 0
  46. SetAttr "OutTexture" 0
  47.  
  48. Request '"Tutorial Message"' '"Example1: the making of a Cheesy font."' 'Ok'
  49.  
  50. Request '"Tutorial Message"' '"Set resolution to 8 colours"' 'Ok'
  51. Resolution 3
  52.  
  53. Request '"Tutorial Message"' '"Load the font Balloon, size 100 points."' 'Ok'
  54. LoadFont "Balloon.font" 100
  55. CALL WaitRedraw (FM_RESULT)
  56.  
  57. Request '"Tutorial Message"' '"Load the front texture: brush Groviera."' 'Ok'
  58. LoadTexture "Front" "Brush" "FontMachine:Brush/Groviera"
  59. CALL WaitRedraw (FM_RESULT)
  60.  
  61. Request '"Tutorial Message"' '"Set up the right palette."' 'Ok'
  62. EditPal 1 0 0 0
  63. EditPal 2 72 33 0 
  64. EditPal 3 145 67 0
  65. EditPal 4 217 100 0
  66. EditPal 5 221 121 0
  67. EditPal 6 222 140 0
  68. EditPal 7 223 159 0
  69. CALL WaitRedraw (FM_RESULT)
  70.  
  71. Request '"Tutorial Message"' '"Set Random Mapping (RndMap)."' 'Ok'
  72. SetMapMode "SolidMappedRnd"
  73. CALL WaitRedraw (FM_RESULT)
  74.  
  75. Request '"Tutorial Message"' '"Set 3 pixels Emboss, light from Up-Left."' 'Ok'
  76. SetAttr "Emboss" 3 "UL"
  77. CALL WaitRedraw (FM_RESULT)
  78.  
  79. Request '"Tutorial Message"' '"Set 8 pixels Shadow, positioned Down-Right."' 'Ok'
  80. SetAttr "Shadow" 8 "DR" 1
  81. CALL WaitRedraw (FM_RESULT)
  82.  
  83. Request '"ARexx Message"' '"Done."' 'Ok'
  84.  
  85. UnLockGui
  86.  
  87. EXIT
  88.  
  89. /******************************************************************/
  90.  
  91. WaitRedraw:
  92.     ARG Res
  93.     /* wait the rendering of the font */
  94.     DO WHILE Res ~= 0
  95.         CheckRedraw
  96.         Res = FM_RESULT
  97.         ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  98.     END
  99.     RETURN
  100.  
  101. /******************************************************************/
  102.